home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
IP17.h.z
/
IP17.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
6KB
|
175 lines
/**************************************************************************
* *
* Copyright (C) 1987, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*
* IP17.h -- cpu board specific defines for IP17
*/
#ifndef __SYS_IP17_H__
#define __SYS_IP17_H__
#ident "$Revision: 1.13 $"
#if !LOCORE
#include "sys/types.h"
#endif !LOCORE
/*
* IP17 CPU Board Addresses
*/
#define LOCK_ADDR 0xbe000000 /* Lock array */
#define U_LOCK_ADDR 0xbe200000 /* Users' portion of lock array */
#define SBCC_ADDR 0xbe400000 /* SBCC chip */
#define LOCK_DIAGADDR 0xbec00000 /* Diagnostics lock array. */
#define U_LOCK_DIAGADDR 0xbee00000 /* Users' portion of " " " */
#define MPSR_ADDR 0xbf000000 /* MP status register */
#define TIM0_ACK_ADDR 0xbf100000 /* Clear T0 interrupt */
#define TIM1_ACK_ADDR 0xbf180000 /* Clear T1 interrupt */
#define LED_ADDR 0xbf200001 /* LED register */
#define PT_CLOCK_ADDR 0xbf600000 /* Timer chip */
#define DUART0_ADDR 0xbf800000 /* Keyword/mouse DUART */
#define DUART1_ADDR 0xbfa00000 /* Second DUART */
#define DUART2_ADDR 0xbf400000 /* Third DUART (IP9 only) */
#define EPROM_ADDR 0xbfc00000 /* EPROM */
#define E2PROM_ADDR 0xbfe00000 /* EEPROM base addr */
#define E2ENDIAN_BYTE 0 /* EEPROM endian flag byte */
#define E2ENDIAN_BIT 0x4 /* 1 == big, 0 == lil */
#define E2SCSIZE_BYTE 32 /* EEPROM 2nd-cache-size byte follows
* 256-bit (32-byte) bootstream */
#define E2SCSIZE_4MB 0xba /* (char)0xba == 4meg, all else 1mb */
/* MP Status Register bits for IP17 */
#define MPSR_MASK 0x003f /* only keep interesting bits */
#define MPSR_T1 0x0200 /* T1 interrupt pending == 1 */
#define MPSR_T0 0x0100 /* T0 interrupt pending == 1 */
#define MPSR_IDMASK 0x0060 /* MP bus ID# */
#define MPSR_MEMMASK 0x1f /* Memory size mask */
#define MPSR_ECCON 0x0080 /* RMI read ECC ON (IP17) */
/* Sub-defines for mpsr memsize field (mpsr 0..4) */
#define MPSR_MEM_HBIT 0x10 /* 0: memsz = 16M * bits in LMASK */
/* 1: memsz = 256M + 64M * LMASK */
#define MPSR_MEM_LMASK 0xf /* low bits give multiplier */
/* LED Register bits */
#define LED_3WAY 0x80 /* 3 Way disable bits */
#define LED_MASK 0x7f /* actual value */
/* Hardware lock entry */
#define LOCK_NUMPAGES 1024 /* number of pages of locks */
#define LOCK_NUMKPAGES 512 /* number of kernel pages of locks */
#define LOCK_NUMUPAGES 512 /* number of user pages of locks */
#define LOCK_PERPAGE 64 /* number of locks per page */
#define LOCK_TAKEN 0x1 /* least significant bit of value */
/* IP17 RMP registers */
#define RMPINTR_STATUS 0xbd800000 /* internal intr pend and intr status*/
#define RMPBERR_CLEAR 0xbd000000 /* clear internal level 4 intr bits */
#define RMPERR_ADDRHI 0xbc000000 /* bus-errored address bits 43..31 */
#define RMPERR_ADDRLO 0xbc000004 /* bus-errored address bits 31..0*/
#define RMPEND_EBYTE_EL 0xbd800007 /* byte address of endian bit in le */
#define RMPEND_EL 0x1 /* set RMP to little endian mode */
/* Bus error bit definitions for RMPINTR_STATUS */
#define RMPBERR_DMA 0x100 /* Bus error on dma */
#define RMPBERR_IOEACK 0x80 /* IO EACK */
#define RMPBERR_IOWACK 0x40 /* IO WACK */
#define RMPBERR_RANGE 0x20 /* Addr > 4Gb */
#define RMPBERR_MASK 0x1e0
/* primary interrupt sources */
#define RMP_INTR_MASK 0x1F /* all possible sync bus bits */
#define RMP_INT0_PEND 1 /* only sync bus sets this */
#define RMP_SYNC_INT RMP_INT0_PEND
#define RMP_INT1_PEND 2 /* sync bus or RS232 */
#define RMP_RS232_INT RMP_INT1_PEND
#define RMP_INT2_PEND 4 /* sync bus or Timer 0 */
#define RMP_T0_INT RMP_INT2_PEND
#define RMP_INT3_PEND 8 /* sync bus or Timer 1 */
#define RMP_T1_INT RMP_INT3_PEND
#define RMP_INT4_PEND 0x10 /* sync bus or Internal */
#define RMP_INTERNAL RMP_INT4_PEND
/* RMP Pseudo-3way registers needing to be saved & restored */
#define RMP_P3WAY_CNTCMD ((unsigned long *)0xbb000004)
#define RMP_P3WAY_A ((unsigned long *)0xba000000)
#define RMP_P3WAY_B ((unsigned long *)0xba000004)
#define RMP_P3WAY_C ((unsigned long *)0xb9000000)
#define RMP_P3WAY_D ((unsigned long *)0xb9000004)
#define RMP_P3WAY_BASE ((unsigned long *)0xb8000000)
/* RMI control register and bit definitions */
#define RMI_CONTROL 0xbf080000
#define RMI_READECC 0x80 /* 0 --> ecc checking on */
#define RMI_REFRESH 0x40 /* 0 --> 25mhz refresh, 1 --> 50mhz */
/* GIO related defines */
#define GDMA_HTOG 0x0000 /* DMA Mode: 0 = Host to Gfx */
#define GDMA_GTOH 0x2000 /* DMA Mode: 1 = Gfx to Host */
#if !LOCORE
struct rmperr_addr {
union {
struct {
uint :20, /* XXX EL */
r4kcmd:8,
rmp_eaddr:4;
} rmperr_fields;
uint rmperr_val;
} rmperr_addr_hi;
uint rmperr_addrlo;
};
#define rmperr_addrhi rmperr_addr_hi.rmperr_fields.rmp_eaddr
#define rmpr4k_cmd rmperr_addr_hi.rmperr_fields.rk4cmd
#define rmperr_word rmperr_addr_hi.rmperr_val
#endif /* !LOCORE */
/*
* IP17 ECC error handler defines.
* Define an additional exception frame for the ECC handler.
* Save 3 more registers on this frame: C0_CACHE_ERR, C0_TAGLO,
* and C0_ECC.
* Call this an ECCF_FRAME.
*/
#define ECCF_CACHE_ERR 0
#define ECCF_TAGLO 1
#define ECCF_ECC 2
#define ECCF_ERROREPC 3
#define ECCF_PADDR 4
#define ECCF_SIZE (5 * 4)
#define CAUSE_BERRINTR CAUSE_IP7 /* Bus error intr. */
/* Mask to remove SW bits from pte. Note that the high-order
* address bits are overloaded with SW bits, which limits the
* physical addresses to 32 bits. These are limited anyway because
* of the Clover2 backplane.
*/
#define TLBLO_HWBITS 0x03ffffff /* 20 bit ppn, plus CDVG */
#define TLBLO_HWBITSHIFT 6 /* A shift value, for masking */
#define TLBLO_PFNTOKDMSHFT 6 /* tlblo pfn to direct mapped */
#define SR_BERRBIT SR_IBIT7
#include "sys/clover2.h"
#endif /* __SYS_IP17_H__ */